package com.tueye.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import com.tueye.base.util.BaseService;
import com.tueye.base.util.Page;
import com.tueye.dao.IKeyWordDao;
import com.tueye.entity.KeyWords;
import com.tueye.service.IKeyWordService;
import com.tueye.service.exception.TuEyeServiceException;

@Scope("prototype")
@Component("keyWordService")
public class KeyWordServiceImpl extends BaseService implements IKeyWordService {
	
	@Autowired
	@Qualifier("keyWordDao")
	private IKeyWordDao keyWordDao;
	@Override
	public void addKeyWord(KeyWords keyWord) throws TuEyeServiceException {

		this.keyWordDao.addKeyWord(keyWord);
	}

	@Override
	public void delKeyWords(String id) throws TuEyeServiceException {

		this.keyWordDao.delKeyWords(id);
	}

	@Override
	public KeyWords getKeyWordsById(String id) throws TuEyeServiceException {

		return this.keyWordDao.getKeyWordsById(id);
	}

	@Override
	public Page pagedQueryByHQL(String hql, int pageNo, int pageSize,
			Object... values) throws TuEyeServiceException {

		return this.keyWordDao.pagedQueryByHQL(hql, pageNo, pageSize, values);
	}

	@Override
	public List<KeyWords> getKeyWordList() throws TuEyeServiceException {
		
		return this.keyWordDao.getKeyWordList();
	}

}
